Method: Nokogiri::XML::Node#<<

Defined in:
lib/nokogiri/xml/node.rb

#<<(node_or_tags) ⇒ Object

Add node_or_tags as a child of this Node.

node_or_tags can be a Nokogiri::XML::Node, a ::DocumentFragment, a ::NodeSet, or a String containing markup.

Returns self, to support chaining of calls (e.g., root << child1 << child2)

Also see related method add_child.


292
293
294
295
# File 'lib/nokogiri/xml/node.rb', line 292

def <<(node_or_tags)
  add_child(node_or_tags)
  self
end